package com.binson.apppay.exception.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.binson.common.core.domain.R;
import com.binson.common.model.AppModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
@Slf4j
public class FlowExceptionHandler {

   public static R<?>  test(AppModel appModel, BlockException e){
         log.info("test服务降级,限流了");
        e.printStackTrace();
        appModel.setName("test服务降级,限流了");

        return R.fail(appModel);
    }
}
